Optimal. Leaf size=149 \[ \frac{(f x+g)^4 \left (a+b \log \left (c (d+e x)^n\right )\right )}{4 f}+\frac{b n x (d f-e g)^3}{4 e^3}-\frac{b n (f x+g)^2 (d f-e g)^2}{8 e^2 f}-\frac{b n (d f-e g)^4 \log (d+e x)}{4 e^4 f}+\frac{b n (f x+g)^3 (d f-e g)}{12 e f}-\frac{b n (f x+g)^4}{16 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12266, antiderivative size = 149, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.111, Rules used = {2412, 2395, 43} \[ \frac{(f x+g)^4 \left (a+b \log \left (c (d+e x)^n\right )\right )}{4 f}+\frac{b n x (d f-e g)^3}{4 e^3}-\frac{b n (f x+g)^2 (d f-e g)^2}{8 e^2 f}-\frac{b n (d f-e g)^4 \log (d+e x)}{4 e^4 f}+\frac{b n (f x+g)^3 (d f-e g)}{12 e f}-\frac{b n (f x+g)^4}{16 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2412
Rule 2395
Rule 43
Rubi steps
\begin{align*} \int \left (f+\frac{g}{x}\right )^3 x^3 \left (a+b \log \left (c (d+e x)^n\right )\right ) \, dx &=\int (g+f x)^3 \left (a+b \log \left (c (d+e x)^n\right )\right ) \, dx\\ &=\frac{(g+f x)^4 \left (a+b \log \left (c (d+e x)^n\right )\right )}{4 f}-\frac{(b e n) \int \frac{(g+f x)^4}{d+e x} \, dx}{4 f}\\ &=\frac{(g+f x)^4 \left (a+b \log \left (c (d+e x)^n\right )\right )}{4 f}-\frac{(b e n) \int \left (\frac{f (-d f+e g)^3}{e^4}+\frac{(-d f+e g)^4}{e^4 (d+e x)}+\frac{f (-d f+e g)^2 (g+f x)}{e^3}+\frac{f (-d f+e g) (g+f x)^2}{e^2}+\frac{f (g+f x)^3}{e}\right ) \, dx}{4 f}\\ &=\frac{b (d f-e g)^3 n x}{4 e^3}-\frac{b (d f-e g)^2 n (g+f x)^2}{8 e^2 f}+\frac{b (d f-e g) n (g+f x)^3}{12 e f}-\frac{b n (g+f x)^4}{16 f}-\frac{b (d f-e g)^4 n \log (d+e x)}{4 e^4 f}+\frac{(g+f x)^4 \left (a+b \log \left (c (d+e x)^n\right )\right )}{4 f}\\ \end{align*}
Mathematica [A] time = 0.208142, size = 226, normalized size = 1.52 \[ \frac{e x \left (12 a e^3 \left (4 f^2 g x^2+f^3 x^3+6 f g^2 x+4 g^3\right )+b n \left (-6 d^2 e f^2 (f x+8 g)+12 d^3 f^3+4 d e^2 f \left (f^2 x^2+6 f g x+18 g^2\right )+e^3 \left (-\left (16 f^2 g x^2+3 f^3 x^3+36 f g^2 x+48 g^3\right )\right )\right )\right )+12 b e^3 \left (4 d g^3+e x \left (4 f^2 g x^2+f^3 x^3+6 f g^2 x+4 g^3\right )\right ) \log \left (c (d+e x)^n\right )-12 b d^2 f n \left (d^2 f^2-4 d e f g+6 e^2 g^2\right ) \log (d+e x)}{48 e^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.481, size = 836, normalized size = 5.6 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.14845, size = 383, normalized size = 2.57 \begin{align*} \frac{1}{4} \, b f^{3} x^{4} \log \left ({\left (e x + d\right )}^{n} c\right ) + \frac{1}{4} \, a f^{3} x^{4} + b f^{2} g x^{3} \log \left ({\left (e x + d\right )}^{n} c\right ) + a f^{2} g x^{3} - b e g^{3} n{\left (\frac{x}{e} - \frac{d \log \left (e x + d\right )}{e^{2}}\right )} - \frac{1}{48} \, b e f^{3} n{\left (\frac{12 \, d^{4} \log \left (e x + d\right )}{e^{5}} + \frac{3 \, e^{3} x^{4} - 4 \, d e^{2} x^{3} + 6 \, d^{2} e x^{2} - 12 \, d^{3} x}{e^{4}}\right )} + \frac{1}{6} \, b e f^{2} g n{\left (\frac{6 \, d^{3} \log \left (e x + d\right )}{e^{4}} - \frac{2 \, e^{2} x^{3} - 3 \, d e x^{2} + 6 \, d^{2} x}{e^{3}}\right )} - \frac{3}{4} \, b e f g^{2} n{\left (\frac{2 \, d^{2} \log \left (e x + d\right )}{e^{3}} + \frac{e x^{2} - 2 \, d x}{e^{2}}\right )} + \frac{3}{2} \, b f g^{2} x^{2} \log \left ({\left (e x + d\right )}^{n} c\right ) + \frac{3}{2} \, a f g^{2} x^{2} + b g^{3} x \log \left ({\left (e x + d\right )}^{n} c\right ) + a g^{3} x \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.95985, size = 713, normalized size = 4.79 \begin{align*} -\frac{3 \,{\left (b e^{4} f^{3} n - 4 \, a e^{4} f^{3}\right )} x^{4} - 4 \,{\left (12 \, a e^{4} f^{2} g +{\left (b d e^{3} f^{3} - 4 \, b e^{4} f^{2} g\right )} n\right )} x^{3} - 6 \,{\left (12 \, a e^{4} f g^{2} -{\left (b d^{2} e^{2} f^{3} - 4 \, b d e^{3} f^{2} g + 6 \, b e^{4} f g^{2}\right )} n\right )} x^{2} - 12 \,{\left (4 \, a e^{4} g^{3} +{\left (b d^{3} e f^{3} - 4 \, b d^{2} e^{2} f^{2} g + 6 \, b d e^{3} f g^{2} - 4 \, b e^{4} g^{3}\right )} n\right )} x - 12 \,{\left (b e^{4} f^{3} n x^{4} + 4 \, b e^{4} f^{2} g n x^{3} + 6 \, b e^{4} f g^{2} n x^{2} + 4 \, b e^{4} g^{3} n x -{\left (b d^{4} f^{3} - 4 \, b d^{3} e f^{2} g + 6 \, b d^{2} e^{2} f g^{2} - 4 \, b d e^{3} g^{3}\right )} n\right )} \log \left (e x + d\right ) - 12 \,{\left (b e^{4} f^{3} x^{4} + 4 \, b e^{4} f^{2} g x^{3} + 6 \, b e^{4} f g^{2} x^{2} + 4 \, b e^{4} g^{3} x\right )} \log \left (c\right )}{48 \, e^{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 42.5615, size = 450, normalized size = 3.02 \begin{align*} \begin{cases} \frac{a f^{3} x^{4}}{4} + a f^{2} g x^{3} + \frac{3 a f g^{2} x^{2}}{2} + a g^{3} x - \frac{b d^{4} f^{3} n \log{\left (d + e x \right )}}{4 e^{4}} + \frac{b d^{3} f^{3} n x}{4 e^{3}} + \frac{b d^{3} f^{2} g n \log{\left (d + e x \right )}}{e^{3}} - \frac{b d^{2} f^{3} n x^{2}}{8 e^{2}} - \frac{b d^{2} f^{2} g n x}{e^{2}} - \frac{3 b d^{2} f g^{2} n \log{\left (d + e x \right )}}{2 e^{2}} + \frac{b d f^{3} n x^{3}}{12 e} + \frac{b d f^{2} g n x^{2}}{2 e} + \frac{3 b d f g^{2} n x}{2 e} + \frac{b d g^{3} n \log{\left (d + e x \right )}}{e} + \frac{b f^{3} n x^{4} \log{\left (d + e x \right )}}{4} - \frac{b f^{3} n x^{4}}{16} + \frac{b f^{3} x^{4} \log{\left (c \right )}}{4} + b f^{2} g n x^{3} \log{\left (d + e x \right )} - \frac{b f^{2} g n x^{3}}{3} + b f^{2} g x^{3} \log{\left (c \right )} + \frac{3 b f g^{2} n x^{2} \log{\left (d + e x \right )}}{2} - \frac{3 b f g^{2} n x^{2}}{4} + \frac{3 b f g^{2} x^{2} \log{\left (c \right )}}{2} + b g^{3} n x \log{\left (d + e x \right )} - b g^{3} n x + b g^{3} x \log{\left (c \right )} & \text{for}\: e \neq 0 \\\left (a + b \log{\left (c d^{n} \right )}\right ) \left (\frac{f^{3} x^{4}}{4} + f^{2} g x^{3} + \frac{3 f g^{2} x^{2}}{2} + g^{3} x\right ) & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.33416, size = 1053, normalized size = 7.07 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]